package com.ibuonline.b2b.entity;

import java.io.Serializable;

public class ProdToCustCategory implements Serializable {

	private static final long serialVersionUID = -689380186640395566L;

	//fields
	private java.lang.Long prodId;
	private java.lang.Long customCatId;

	//default constructor
	public ProdToCustCategory() {
	}

	//constructor with arguments
	public ProdToCustCategory(java.lang.Long customCatId, java.lang.Long prodId) {
		this.customCatId = customCatId;
		this.prodId = prodId;
	}

	//getter
	public java.lang.Long getProdId() {
		return prodId;
	}
	public java.lang.Long getCustomCatId() {
		return customCatId;
	}

	//setter
	public void setProdId(java.lang.Long prodId) {
		this.prodId = prodId;
	}
	public void setCustomCatId(java.lang.Long customCatId) {
		this.customCatId = customCatId;
	}

	//equals method
	public boolean equals(Object other) {
		if (this == other)
			return true;
		if (!(other instanceof ProdToCustCategory))
			return false;

		final ProdToCustCategory prodToCustCategory = (ProdToCustCategory)other;
		if (!this.customCatId.equals(prodToCustCategory.getCustomCatId()) || 
			!this.prodId.equals(prodToCustCategory.getProdId()))
			return false;

		return true;
	}

	//hashCode method
	public int hashCode() {
		StringBuffer keys = new StringBuffer();
		keys.append(customCatId).append(",");
		keys.append(prodId).append(",");
		if (keys.length() > 0)
			keys.deleteCharAt(keys.length() - 1);
		return keys.toString().hashCode();
	}

	//toString method
	public String toString() {
		return new StringBuilder("ProdToCustCategory[")
			.append("prodId=").append(prodId).append(", ")
			.append("customCatId=").append(customCatId).append("]").toString();
	}
}